<template>
    <div class="homeswiper">
        <van-swipe :autoplay="3000" lazy-render indicator-color="#FF8000">
            <van-swipe-item v-for="item in banner" :key="item">
                <img :src="item">
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script setup>
const banner = [
    '/images/banner1.jpg',
    '/images/banner2.jpg',
]
</script>

<style lang="less" scoped>
.homeswiper {
    width: 100%;
    // height: 400px;
    // overflow: hidden;

    /* 防止图片溢出容器 */
    // background-size: cover;
    img {
        width: 100%;
        // height: 100%;
        // object-fit: cover;
    }
}
</style>
